// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/12/2015 9:35:43 PM				
// -----------------------------

#ifndef _Common_h
#define _Common_h

#define _COMMON_BASE

#include "Defines.h"
#include "Enums.h"
#include "Assert.h"

#include "Log.h"

/* Math */
#include "CMath.h"
#include "Color.h"
#include "Vector2.h"

/* Win32/WP8 Headers */
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <tchar.h>

/* STL */
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <stack>
#include <sstream>
#include <fstream>
using namespace std;

#ifdef _UNICODE
typedef wstring			tstring;
typedef wstringstream	tstringstream;
#else
typedef string			tstring;
typedef stringstream	tstringstream;
#endif

namespace Flow
{

	/* Check if an interface is not null	*/
	/* if not, release the interface and	*/
	/* set the interface back to null.		*/	
	template<typename T>
	inline void SafeReleaseInterface(T** lpInterface)
	{
		if (*lpInterface)
		{
			(*lpInterface)->Release();
			(*lpInterface) = nullptr;
		}
	}

	/* Game Configuration */
	struct GameConfig
	{
		string		Caption;
		UInt32		Width;
		UInt32		Height;
		Bool		Fullscreen;
		Bool		VSync;
	};

}


#endif